#pragma once
#ifndef __SHADERTEXTURE_H__
#define __SHADERTEXTURE_H__

#include "Utility.h"

#include "../util/D3DCommon.h"
#include "../util/PreDeclare.h"

#include <vector>

namespace WindGE
{
	enum ETextureType
	{
		e_tex_unknown,
		e_tex_1d,
		e_tex_1d_array,
		e_tex_2d,
		e_tex_2d_array,
		e_tex_2dms,
		e_tex_2dms_array,
		e_tex_3d,
		e_tex_cube,
		e_tex_cube_array
	};

	class WIND_CORE_API Texture
	{
	public:
		Texture();
		~Texture();

		bool init(RenderDevicePtr renderDevice, Texture2D& tex);
		bool init(RenderDevicePtr renderDevice, Texture2DPtr tex);
		bool init(RenderDevicePtr renderDevice, const std::vector<Texture2DPtr>& texList);

		void release();

		inline ID3D11ShaderResourceView*  srv() const	{ return tex_srv_;  }
		inline ID3D11ShaderResourceView** ppsrv()		{ return &tex_srv_; }

		const D3D11_SHADER_RESOURCE_VIEW_DESC& desc() const { return desc_; }

	private:
		ID3D11ShaderResourceView*			tex_srv_; 
		D3D11_SHADER_RESOURCE_VIEW_DESC		desc_;
	};

}//end namespace WindGE

#endif	//__SHADERTEXTURE_H__
